<?php
class BaseWidget {
	var $_view = null; //视图实体

	function __construct($act = null) {
		$this->BaseWidget($act);
	}
	function BaseWidget($act = null) {
		$this->_view = & get_view();

		if ($act && $act {
			0 }
		!= '_' && method_exists($this, $act)) {
			$this-> $act (); //运行动作
		} else {
			exit ('missing_widget_action');
		}
	}

	function _assign($k, $v = null) {
		$this->_view->assign($k, $v);
	}
}
?>